package com.gy.spark.core.transformations

import org.apache.spark.{SparkConf, SparkContext}

object Operator_union {

  def main(args: Array[String]): Unit = {
    val conf = new SparkConf()
    conf.setMaster("local").setAppName(this.getClass.getSimpleName)
    val sc = new SparkContext(conf)

    val rdd1 = sc.makeRDD(List(1, 2, 3, 4))
    val rdd2 = sc.makeRDD(Array(1, 5, 6, 7, 8))
    rdd1.union(rdd2).foreach {
      println
    }

    sc.stop()
  }

}
